


public class StaticElements {
	
private static	String[][] m = {{"Przesyłki","submenu(['1','Przesyłki','Zamów kuriera','order','Sprawdź przesyłkę','track','Usługi dodatkowe','#'," +
						"'Reklamacje','reklamacje']);"},{"Logistyka","submenu(['2','Logistyka','Centra dystrybucji i " +
						"magazynowania','#','Opłaty','#','Usługi','#']);"},
						{"Multimedia","submenu(['3','Multimedia','Tapety','#','Galeria','#']);"},
						{"O nas","submenu(['4','O nas','Poznaj ELS','els','Kontakt','kontakt'," +
						"'Informacje prawne','prawo','Zgłoś uwagi','kontakt']);"},{"Znajdź nas","mapa"},
						{"Informacje","submenu(['6','Informacje','Aktualnołci','#','Materiały','#']);"}
						};
private	static String[][] m_en = {{"Shipping","submenu(['1','Shipping','Order courier','order','Track shipment','track','Addidtional services','#'," +
							"'Complaint','reklamacje']);"},{"Logistics","submenu(['2','Logistics','distribution and warehouseing center'" +
							",'#','Fees','#','Services','#']);"},
							{"Media","submenu(['3','Media','Wallpapers','#','Gallery','#']);"},
							{"All about us","submenu(['4','About us','Meet ELS','els','Contact','kontakt'," +
							"'Law information','prawo','Report due','kontakt']);"},{"Find us","mapa"},
							{"Informations","submenu(['6','Informations','News','#','Materials','#']);"}
							};
	
	
	
public static String header(String tytul,String styl){
	return 
	
	"<title>"+tytul+"</title>"+
	"<link rel='stylesheet' type='text/css' href='style.css' media='screen'/>"+
	"<link rel='stylesheet' type='text/css' href='"+styl+"' media='screen'/>"+
	"<script type='text/javascript' src='http://maps.google.com/maps/api/js?sensor=false'></script>"+
	"<script type='text/javascript' src='js/mapa.js'></script>"+
	"<script type='text/javascript' src='js/md5.js'></script>"+
	"<script type='text/javascript' src='js/packed.js'></script>"+
	"<script type='text/javascript' src='js/tinybox.js'></script>"+
	"<script type='text/javascript' src='js/skrypt.js'></script>"+
	"<script type='text/javascript' src='js/jQuery.js'></script>"+
	"<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>";
}
public static String naglowek(String costam, int rodz, String tresc, String adres, String lang){
	if(rodz==1){
			if(lang!=null && lang.equals("en")){
				String[] v = {"PL","EN","Log in"};
				return "<div class='naglowek'><a href='index.jsp'><img src='"+costam+"' height=100% align='left'></a>"+langpanel(v,adres)+"</div>";
			}
			else{
				String[] v = {"PL","EN","Zaloguj"};
				return "<div class='naglowek'><a href='index.jsp'><img src='"+costam+"' height=100% style='margin-left: 5px; margin-right:5px;'></a>"+langpanel(v,adres)+"</div>";
			}				
		}
		if(rodz==2){
			if(lang!=null && lang.equals("en")){
				String[] v = {"PL","EN","Log out ("+tresc+")"};
				return "<div class='naglowek'><a href='index.jsp'><img src='"+costam+"' height=100% align='left'></a>" +langpanel(v,adres)+"</div>";	
			}
			else{
				String[] v = {"PL","EN","Wyloguj("+tresc+")"};
				return "<div class='naglowek'><a href='index.jsp'><img src='"+costam+"' height=100% align='left'></a>" +langpanel(v,adres)+"</div>";	
			}
		}
		if(rodz==3){
			if(lang!=null && lang.equals("en")){
				String[] v = {"PL","EN","Log in"};
				return "<div class='naglowek'><a href='index.jsp'><img src='"+costam+"' height=100% align='left'></a>"+tresc+" "+langpanel(v,adres)+"</div>";	
			}
			else{
				String[] v = {"PL","EN","Zaloguj"};
				return "<div class='naglowek'><a href='index.jsp'><img src='"+costam+"' height=100% align='left'></a>"+tresc+" "+langpanel(v,adres)+"</div>";	
			}
		}
		if(rodz==4){
			if(lang!=null && lang.equals("en")){
				String[] v = {"PL","EN","Log in"};
				return "<div class='naglowek'><a href='index.jsp'><img src='"+costam+"' height=100%></a>"+tresc+" "+langpanel(v,adres)+"</div>";	
			}
			else{
				String[] v = {"PL","EN","Zaloguj"};
				return "<div class='naglowek'><a href='index.jsp'><img src='"+costam+"' height=100%></a>"+tresc+" "+langpanel(v,adres)+"</div>";	
			}
		}
		if(rodz==5){
			if(lang!=null && lang.equals("en")){
				String[] v = {"PL","EN","Log out("+tresc+")"};
				return "<div class='naglowek'><a href='index.jsp'><img src='"+costam+"' height=100%></a>" +langpanel(v,adres)+"</div>";	
			}
			else{
				String[] v = {"PL","EN","Wyloguj ("+tresc+")"};
				return "<div class='naglowek'><a href='index.jsp'><img src='"+costam+"' height=100%></a>" +langpanel(v,adres)+"</div>";	
			}
		}
		else{
			return null;
		}
		}
public static String langpanel(String[] tresc,String adres){
	String tr = "<div class='lang' id='lang'>";
	for(int i=0;i<tresc.length;i++){
		if(tresc[i].equals("Zaloguj") || tresc[i].equals("Log in"))
		tr+="<div class='langelem' onClick='TINY.box.show({url:"+'"'+"login.jsp"+'"'+",boxid:"+'"'+"tbox"+'"'+",width:280,height:100,animate:true,close:true,fixed:false,mask:false,top:45,left:10});'>"+tresc[i]+"</div>";
		if(tresc[i].equals("PL"))
			tr+="<div class='langelem' onClick='window.location="+'"'+"login?add="+adres+"&lang=pl"+'"'+"'>"+"<img src=images/pl.png> "+tresc[i]+"</div>";	
		if(tresc[i].equals("EN"))
			tr+="<div class='langelem' onClick='window.location="+'"'+"login?add="+adres+"&lang=en"+'"'+"'>"+"<img src=images/en.png> "+tresc[i]+"</div>";	
		if(tresc[i].contains("Wyloguj") || tresc[i].contains("Log out"))
			tr+="<div class='langelem' onClick='window.location="+'"'+"login?ac=wyl"+'"'+"'>"+tresc[i]+"</div>";	
		if(i!=tresc.length-1){
			tr+="<div class='langdziel'>|</div>";
		}
	}
	return tr+"</div><div class='lang2' id='lang2'></div>";
	}
public static String menuglowne(String lg){
	String[][] elementy=null;
	if(lg.equals("pl"))
	{
		elementy=m;
	}else
	{
		elementy=m_en;
	}
	
	String menu = "";
	for(int i=0;i<elementy.length;i++){
		if(elementy[i][1].contains("document.getElementById")){
		menu+="<div class='menuelem'  id='men"+(i+1)+"' onmouseout='style.background="+'"'+"none"+'"'+"; style.border="+'"'+"0px solid #bbb"+'"'+";' onmousemove='func("+(i+1)+",event);'><a href='#' onClick="+'"'+elementy[i][1]+'"'+";>"+elementy[i][0]+"</a></div>";
		}
		else if(elementy[i][1].contains("submenu")){
			
			menu+="<div class='menuelem'  id='men"+(i+1)+"' onmouseout='style.background="+'"'+"none"+'"'+"; style.border="+'"'+"0px solid #bbb"+'"'+"; " +
					"hide2("+(i+1)+");' onmousemove='func("+(i+1)+",event);' " +
							"onmouseover='show2("+(i+1)+");'><a href=#>"+elementy[i][0]+"</a></div>";			
			menu+="<script type='text/javascript'>"+elementy[i][1]+"</script>";
		
		
		
		
		}
		else{
			menu+="<div class='menuelem'  id='men"+(i+1)+"' onmouseout='style.background="+'"'+"none"+'"'+"; style.border="+'"'+"0px solid #bbb"+'"'+";' onmousemove='func("+(i+1)+",event);'><a href='?add="+elementy[i][1]+"'>"+elementy[i][0]+"</a></div>";
			
		}
	}	
	return menu;
}
public static String content(){
	return "<div class='content' id='content'>";
}
public static String contentend(){
	return "</div>";
}
public static String panel_lewy(){
	return "<div class='pleft' id='pleft'>";
}
public static String panel_prawy(){
	return "<div class='pright' id='pright'>";
}
public static String tresc(){
	return "<div class='tresc' id='tresc'>";
}
public static String stopka(){
	return "<div class='stopka'>";
}
public static String replaceCharacters(String ciag){
	String wynik="";
	wynik = ciag.replaceAll("Ą","&#260;");
	wynik = wynik.replaceAll("ą","&#261;");
	wynik = wynik.replaceAll("Ć","&#262;");
	wynik = wynik.replaceAll("ć","&#263;");
	wynik = wynik.replaceAll("Ę","&#280;");
	wynik = wynik.replaceAll("ę","&#281;"); 
	wynik = wynik.replaceAll("Ł","&#321;");
	wynik = wynik.replaceAll("ł","&#322;");
	wynik = wynik.replaceAll("Ń","&#323;");
	wynik = wynik.replaceAll("ń","&#324;");
	wynik = wynik.replaceAll("Ó","&#211;");
	wynik = wynik.replaceAll("ó","&#243;");
	wynik = wynik.replaceAll("Ś","&#346;");
	wynik = wynik.replaceAll("ś","&#347;"); 
	wynik = wynik.replaceAll("Ź","&#377;");
	wynik = wynik.replaceAll("ź","&#378;");
	wynik = wynik.replaceAll("Ż","&#379;");
	wynik = wynik.replaceAll("ż","&#380;");

	return wynik;
	}
public static String menu_lewe_PL(){
	return 	"<br><div class='paczka_mala'><label class=white><img src=images/telephone.gif width=64px; height=64px;><br>INFOLINIA:<br>" +
			"801 123 123</label><br><br><fieldset class=obrys>Podaj numer przesyłki:<form method='post' name='numerek' onSubmit='SprawdzNumer()'><textarea cols='15' rows='3' name='no' id='no' onKeyPress='TylkoNumer(event)' >" +
			"</textarea><br><br><label><input class=przycisk type='button' name='ok' value='Szukaj' onClick='SprawdzNumer()'></label></form></fieldset><br><div class=menu_kontaktowe>Na skróty:<br><ul style='list-style:square;margin-left:10px'>" +
			"<li><a style='color:white' class=pright href='index.jsp?add=kontakt'>Kontakt</a><br></li><li><a style='color:white' href='index.jsp?add=mapa'>Szukaj placówki</a><br></li>" +
			"<li><a style='color:white' href='index.jsp?add=aktualnosci'>Aktualności</a><br></li><li><a style='color:white' href='index.jsp?add=uslugi'>Usługi</a><br></li><li><a style='color:white' href='index.jsp?add=oplaty'>Opłaty</a><br></li>" +
			"</ul></div><br><br><a href='index?add=przesylki'><img src=images/platnosci.gif></a><br><br><a href='index.jsp'><img src=images/firma.png></a><br><br></div>";
	}
public static String menu_lewe_EN(){
	return "<br><div class='paczka_mala'><label class=white><img src=images/telephone.gif width=64px; height=64px;><br>HELPLINE:<br>801 123 123</label>" +
		   "<br><br><fieldset class=obrys>Enter the shipment number:<form method='post' name='numerek' onSubmit='SprawdzNumer()'><textarea cols='15' rows='3' name='no' id='no' onKeyPress='TylkoNumer(event)'></textarea><br><br>" +
		   "<label><input class=przycisk type='button' name='ok' value='Search' onClick='SprawdzNumer()'></label></form></fieldset><br><div class=menu_kontaktowe>Shortcuts:<br><ul style='list-style:square;margin-left:10px'>" +
		   "<li><a style='color:white' class=pright href='index.jsp?add=kontakt'>Contact</a><br></li><li><a style='color:white' href='index.jsp?add=mapa'>Find outpost</a><br></li><li><a style='color:white' href='index.jsp?add=aktualnosci'>News</a><br></li>" +
		   "<li><a style='color:white' href='index.jsp?add=uslugi'>Services</a><br></li><li><a style='color:white' href='index.jsp?add=oplaty'>Fees</a><br></li></ul></div><br><br><a href='index.jsp?add=przesylki'><img src=images/platnosci.gif></a><br>" +
		   "<br><a href='index.jsp'><img src=images/firma.png></a><br><br></div>";
	}
}